package com.smart.meetingDemo.controller;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import com.smart.meetingDemo.service.FeishuService;

import java.util.List;
import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/feishu")
public class FeishuController {

    @Resource
    private FeishuService feishuService;

    @PostMapping("/sendMessage")
    public String sendMessage(@RequestBody Map<String, Object> request) throws Exception {
        List<String> receiveIds = (List<String>) request.get("receiveId");
        String content = (String) request.get("content");
        feishuService.sendMessage(receiveIds, content);
        return "success";
    }


}